package org.marketlive.entity.account;

import org.marketlive.entity.IEntityHome;


/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

import java.util.Collection;

/**
 * Interface to the CreditCardType entity Home object responsible for creating and finding credit card types.
 */
public interface ICreditCardTypeHome extends IEntityHome {

    /**
     * Create a credit card type entity with the given name and code.
     * 
     * @param name String value
     * @param code String value
     * @return ICreditCardType created from the input parameters
     */
    ICreditCardType create(final String name, final String code);

    /**
     * Returns the {@link ICreditCardType} with the given code. 
     *
     * @param code the credit card type code to search on.
     * @return an instance of <code>ICreditCardType</code> if one is found for the given code, null otherwise.
     */
    ICreditCardType findByCode(final String code);

    /**
     * Find all credit card types that are active.
     * 
     * @return Collection of credit card type entities that are active
     */
    Collection findActive();

}
